<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <ol>
        <li class="item1">List item 1</li>
        <li>List item 2</li>
        <li class="item3">List item 3</li>
    </ol>

    <script src="jquery-3.7.1.min.js"></script>
    <script>
        $(document).ready(function() {
            $("ol").append("<li>append</li>");
            $("ol").prepend("<li>prepend</li>");

            $(".item1").after("<li>after</li>");
            $(".item3").before("<li>before</li>");
        });
    </script>
</body>
</html>